
define(['angular',"text!main.html",'url','common'], function (angular,tpl) {
    //angular会自动根据controller函数的参数名，导入相应的服务
    function controller($scope, $http, $interval){
    		showSpin();
    		bottomMenu();
    		$scope.adUrl = ip+"/"+"data/afficheimg/";
    		var url = cl.getMainInfoUrl+"&callback=JSON_CALLBACK";
    	    $http.jsonp(url).success(function (res) {
    			if(res.code=="CL02020"){//获取成功
    				$scope.background = res.result.background;
    				$scope.top = res.result.top;
    			}
    			hideSpin();
    	    })
    };
    return {controller:controller,tpl:tpl};
});